﻿@model com.fmtx.Model.PictureType
<form class="form-horizontal" action="/Tool/Picture/EditType" method="post" >
    <div class="control-group">
      <label style="width:inherit;" class="control-label" for="input01">相册名称</label>
      <div style="margin-left:50px;" class="controls">
          @Html.TextBoxFor(m => m.Name, new {placeholder="相册名称" ,@class="input-medium" })
          <span class="help-inline">@Html.ValidationMessageFor(m=>m.Name)</span>
      </div>
    </div>
    <div class="control-group">
      <label style="width:inherit;" class="control-label" for="input01">城市</label>
      <div style="margin-left:50px;" class="controls">
          @Html.TextBoxFor(m => m.CityName, new {placeholder="请选择城市",@class="input-medium" })
          @Html.HiddenFor(m=>m.CityId)
      </div>
    </div>
    <div class="control-group">
      <label style="width:inherit;" class="control-label" for="input01">景点</label>
      <div style="margin-left:50px;" class="controls">
          @Html.TextBoxFor(m => m.PlaceName, new {placeholder="请选择景点",@class="input-medium" })
          @Html.HiddenFor(m=>m.PlaceId)
      </div>
    </div>
    <div class="control-group">
      <label style="width:inherit;" class="control-label" for="input01">简介</label>
      <div style="margin-left:50px;" class="controls">
          @Html.TextAreaFor(m => m.Summary, new { placeholder="请输入相册介绍"})
      </div>
    </div>
    <div class="control-group">
      <label style="width:inherit;" class="control-label" for="input01">标签</label>
      <div style="margin-left:50px;" class="controls">
          @Html.TextAreaFor(m => m.KeyWord, new { placeholder="请选择或输入标签"})
      </div>
    </div>
    <div class="control-group">
      <div style="margin-left:50px;" class="controls">
        <ul class="unstyled lifloatmargin">
            @if(ViewBag.Keyword!=null){
                foreach (var item in ViewBag.Keyword)
                {
                    <li><a onclick="setlabel(this,'#KeyWord')">@item.Keyword</a></li>
                }
            }
        </ul>
      </div>
    </div>
    <div class="form-actions">
        @Html.HiddenFor(m=>m.Id)
        <button type="submit" class="btn btn-primary">保存更改</button>
        <button class="btn" onclick="closemodal()" >取消</button>
    </div>
</form>
@Scripts.Render("~/js/jqueryval")
<script type="text/javascript">
    $(document).ready(function () {
        $("input[name=CityName]").fmtxDropdown({ url: "/action/area/CityBykey", value: "CityId" });
        $("input[name=PlaceName]").fmtxDropdown({ url: "/action/area/PlaceBykey", value: "PlaceId", param: "input[name=CityId]", paramkey: "cityid" });
    });
</script>